import request from "@/utils/request";

/**
 * 整改管理分页查询
 */
export const judgePage = data => {
  return request({
    url: "/crm/reform/management/judgePage",
    method: "post",
    data
  });
};
/**
 * 获取状态数量
 */
export const stateCount = data => {
  return request({
    url: "/crm/reform/management/judge/getCount",
    method: "post",
    data
  });
};
/**
 * 条件导出
 */
export const rectificationExport = data => {
  return request({
    url: "/crm/reform/management/judge/export",
    method: "post",
    responseType: "blob",
    data
  });
};
/**
 * 查询需核实的责任人
 */
export const verified = reformId => {
  return request({
    url: `/crm/assign/blames/${reformId}/need-verified-users`,
    method: "get"
  });
};
/**
 * 发起员工确认
 */
export const sendStaffConfirm = reformId => {
  return request({
    url: `/crm/reform/management/sendStaffConfirm/${reformId}`,
    method: "get"
  });
};
/**
 * 撤回判责通知
 */
export const revokeStaffMsg = msgId => {
  return request({
    url: `/crm/reform/management/revokeStaffMsg/${msgId}`,
    method: "get"
  });
};
/**
 * 判责核实
 */
export const verify = data => {
  return request({
    url: "/crm/assign/blames/verify",
    method: "post",
    data
  });
};

//判责详情
export const judgmentDetail = reformId => {
  return request({
    url: `/crm/assign/blames/${reformId}`,
    method: "get"
  });
};

//判责提交
export const judgmentSubmit = data => {
  return request({
    url: "/crm/assign/blames/submit",
    method: "post",
    data
  });
};
//查询所有角色
export const getAllRole = () => {
  return request({
    url: `/crm/reform/type/getAllRole`,
    method: "get"
  });
};
//获取供应商列表
export const getBlameslist = () => {
  return request({
    url: `/mall/tenant/merchant/tenant/getProvideList?current=1&size=1000`,
    method: "post",
    data: { status: 1 }
  });
};
//获取角色下面的成员
export const getRoleuser = roleId => {
  return request({
    url: `/sass/role/userList/${roleId}`,
    method: "get"
  });
};
//获取角色下面的成员
export const getPartner = data => {
  return request({
    url: "finance/partner/page?current=1&size=10",
    method: "post",
    data
  });
};
